<template>
  <div id="app">
    <div class="top">
      <div class="list">
        <i class="iconfont iconqudaodizhi" />
        <span class="url">{{ url }}</span>
      </div>
      <div class="right">
        <i class="iconfont iconyuanneidingcan" />
        <i class="iconfont iconpinglun" />
      </div>
    </div>

    <div class="content">
      <!--搜索模块 -->
      <mysearch />

      <div class="today_snack">
        <div v-for="(value, index) in arr" :key="index" class="snack">
          {{ value }}
        </div>
      </div>
      <!--分类模块 -->
      <div class="classification_goods">
        <div
          v-for="(value, index) in 15"
          :key="index"
          class="classification_name"
        >
          <img src="../assets/Snipaste_2021-04-21_16-48-14.png" alt="">
          <span>美食外卖</span>
        </div>
      </div>
      <!-- 信息提醒模块 -->
      <mywelfare />
      <div class="active_region">
        <ul>
          <!-- 轮播图模块 -->
          <li class="myswipe">
            <myswipe />
          </li>
          <!-- 特价模块 -->
          <li class="li2">
            <myspecial />
          </li>
        </ul>
      </div>
      <!-- 商店信息模块 -->
      <div
        v-for="(value, index) in 20"
        :key="index"
        class="shop"
        @click="$router.push({ path: '/details' })"
      >
        <myshop :islist="true" />
      </div>
    </div>
  </div>
</template>

<script>
import mysearch from '@/components/search'
import myswipe from '@/components/swipe'
import myspecial from '@/components/special'
import mywelfare from '@/components/welfare'
import myshop from '@/components/shop'
export default {
  components: {
    mysearch,
    myswipe,
    myspecial,
    mywelfare,
    myshop
  },
  data() {
    return {
      url: '天河区棠东毓南路一巷九号，毓华电梯公寓123214',
      arr: ['烧仙草', '水果捞', '卤面', '盖码饭', '炸鸡'],
      isshow: true
    }
  }
}
</script>

<style lang="scss" scoped>
#app {
  position: relative;
}
.top {
  padding-top: 30px;
  padding-bottom: 30px;
  width: 100%;
  display: flex;
  color: #fff;
  justify-content: space-between;
  background: #11b8fe;
  .list {
    width: 60%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;

    .url {
      font-size: 12px;
      position: relative;
    }
  }
  .right {
    .iconpinglun {
      margin: 0 20px;
    }
  }
}
.content {
  padding-top: 20px;
  position: absolute;
  top: 56px;
  left: 0;
  width: 100%;
  border-radius: 20px;
  background-color: #f8f8f8;

  .today_snack {
    height: 20px;
    width: 100%;
    margin-top: 15px;
    display: flex;
    .snack {
      margin-left: 5vw;
      height: 20px;
      border-radius: 10px;
      text-align: center;
      line-height: 20px;
      padding: 0 10px;
      color: #66656a;
      background-color: #f0f0f3;
      font-size: 12px;
    }
  }
  .classification_goods {
    padding: 0 10px;
    margin-top: 20px;
    display: flex;

    flex-wrap: wrap;
    .classification_name {
      width: 20%;
      display: flex;
      flex-direction: column;
      justify-content: space-around;
      align-items: center;
      img {
        display: block;
        width: 60px;
        height: 60px;
        border-radius: 50%;
        background-color: #dbbc0f;
      }
      span {
        display: block;
        font-size: 12px;
        margin: 10px 0;
        color: #6b6b6b;
      }
    }
  }

  .active_region {
    width: 100%;
    ul {
      display: flex;
      padding: 0 3vw;
      flex-wrap: wrap;
      justify-content: space-between;
      li {
        margin-top: 10px;
        display: block;
        width: 49%;
        height: 187px;
        border-radius: 10px;
        background-color: #fff;
      }
      .myswipe {
        padding: 20px 0;
      }
    }
  }
}
.li2 {
  padding: 0 10px;
}
.shop {
  width: 100%;
  padding: 10px;
}
</style>
